1. Technical Field
The present invention is directed to storage systems. More specifically, the present invention is directed to a system and method of servicing read requests from a common mirror.
2. Description of Related Art
Most computer systems are made up of at least one processor and one physical storage system. The processor processes, stores and retrieves data from the physical storage system under the guidance of an application program.
Application programs generally run atop an operating system. Among the many tasks of an operating system is that of allowing an application program to have a rather simplistic view of how data (i.e., data files) are stored within a physical storage system. Typically, an application program views the physical storage system as containing a number of hierarchical partitions (i.e., directories) within which entire data files are stored. This simplistic view is often referred to as a logical view since most files are not really stored as unit bodies into directories but rather are broken up into data blocks that may be strewn across the entire physical storage system.
The operating system is able to allow an application program to have this simplistic logical view with the help of a file management system. The file management system stores directory structures, breaks up data files into their constituent data blocks, stores the data blocks throughout a physical storage system and maintains data logs of where every piece of data is stored. Thus, the file management system has to be consulted whenever data files are being stored or retrieved from storage.
Computer systems that have a plurality of physical storage systems (e.g., servers) use an added layer of abstraction when storing and retrieving data. The added layer of abstraction is a logical volume manager (LVM). Volume, in this case, is the storage capacity of a physical storage system. Thus, volume and physical storage system will henceforth be used interchangeably.
The LVM arranges the physical storage systems into volume groups in order to give the impression that storage systems having each a much more voluminous storage capacity are being used. Within each volume group, one or more logical volumes may be defined. Data stored in a logical volume appears to be stored contiguously. However in actuality, the data may be interspersed into many different locations across all the physical storage systems that make up the volume group.
Stated differently, each logical volume in a logical volume group is divided into logical partitions. Likewise, each physical volume in a volume group is divided into physical partitions. Each logical partition corresponds to at least one physical partition. But, although the logical partitions in a logical volume are numbered consecutively or appear to be contiguous to each other, the physical partitions to which they each correspond, need not be contiguous to each other. And indeed, most often, the physical partitions are not contiguous to each other. Thus, one of the many tasks of the LVM is to keep tabs on the location of each physical partition that corresponds to a logical partition.
For fault tolerance and performance, some servers store at least one extra copy of each piece of data onto the physical storage systems they use. For example, if three physical storage systems are used, a server may store a copy of each piece of data in each physical storage system. Storing more than one copy of a piece of data is called mirroring the data. In order to store mirrored data, each logical partition used must correspond to as many physical partitions as there are mirrors (or copies) of the data. In other words, if the data is mirrored three times, for example, each logical partition has to correspond to three physical partitions.
The three physical storage systems in the example above may be referred to as mirrors of each other. Obviously, data may be read from any one of the three mirrors. Several methods of reading data from mirrors have been used. In one method, the mirrors are ranked as first, second and third and data is always read from the first mirror. In another method, data is read from the mirror whose magnetic reading head is closest to the data. In yet another method, data is read from the mirrors in a round robin fashion.
In some instances, however, these methods may not be ideal for reading data from mirrors. For example, in the first method, the mirror from which data is always being read may become a bottleneck while the other mirrors stay idle. Performance of a computer system that uses this method may at times be severely degraded.
In the second method, one mirror may continually service read requests if data to be read is closest to the magnetic head of the mirror. Again, this method may adversely affect performance as that particular mirror may become a bottleneck.
In the third method, data to be read may be closer to the magnetic head of a mirror that just serviced a read request. Nonetheless, a different mirror will be used to service the request. This, of course, may adversely affect performance.
To mitigate the adverse performance of the methods enumerated above, a fourth method has been used. The fourth method uses an algorithm that chooses the least busy of a set of mirrors to service a read request. But if all the mirrors are equally busy, the first mirror to have become busy is used to service the request. In such a case, if a plurality of read requests is received and if each piece of data requested is located close to the next piece of data, different mirrors may be used to service the requests. Clearly, it would be advantageous to have one mirror service these requests.
Hence, what is needed is a system, apparatus and method of chaining a plurality of read requests such that they are issued to one mirror when the locations in which the requested data is stored are close to each other. The read requests may be issued to the least used mirror in a set of mirrors.